home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0399 / 70 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.8 KB

  1. From: mh1@irz301.inf.tu-dresden.de (Michael Hohmuth)
  2. Subject: Environment variables
  3. Date: Fri, 29 Jan 93 18:08:50 MET
  4. Mime-Version: 1.0
  5.  
  6.  
  7. I think it's consense that we should aim for POSIX compatibelity on the 
  8. C library level in MiNT. I wonder how it will be possible to have old 
  9. programs and new ones (which, for instance, know how to handle Unix 
  10. filenames like /foo and /dev/c/bar) coexist, especially if old and new 
  11. programs share environment variables.
  12.  
  13. For the PATH environment variable, the MiNT library contains a hack to 
  14. convert it back and forth when entering the program/spawning a new 
  15. program.
  16.  
  17. Ideally, environment variables which contain file names/paths would be 
  18. passed on between programs in Unix compatible form. However, this is 
  19. impossible because most programs expect them in DOS form.
  20.  
  21. I think we need to pass the environment in DOS form; but, because it's 
  22. especially ugly to puff up programs with file name/environment variable 
  23. conversions, #ifdef's and things like _dox2unx() when porting from the 
  24. Unix platform to the Atari, I think that the environment conversion (as 
  25. with PATH) should be generalized/automatized in the library.
  26.  
  27. What I want is to convert _all_ environment variables (which contain 
  28. file names/paths) to the Unix form in the startup code (not just the PATH 
  29. variable), and convert it back when spawning. To prevent environment 
  30. variables which do not contain file names from being converted, a scheme 
  31. has to be developed that prevents this. I have one in mind already.
  32.  
  33. Would changing the MiNT library this way be acceptable?
  34.  
  35. Michael
  36.  
  37. PS: Besides, system() should be fixed to spawn a /bin/sh when MiNT is 
  38.     active, and _dos2unx() should should convert c:\foo\bar to 
  39.     /dev/c/foo/bar, not c:/foo/bar. (Something for your scratchpad, 
  40.     entropy?)
  41.  
  42. -- 
  43. Internet: hohmuth@freia.inf.tu-dresden.de
  44.